<%@ page contentType="text/html; charset=UTF-8" pageEncoding="UTF-8"%>
<%@ page isELIgnored="false" %>
<%@ taglib prefix="c" uri="http://java.sun.com/jsp/jstl/core" %>
<%@ taglib prefix="fn" uri="http://java.sun.com/jsp/jstl/functions" %>
<%@ taglib prefix="fmt" uri="http://java.sun.com/jsp/jstl/fmt"%>
<%
String path = request.getContextPath();
String basePath = request.getScheme()+"://"+request.getServerName()+":"+request.getServerPort()+path+"/";
%>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
  	<head>
 	    <base href="<%=basePath%>">
		<title>订单号：${order.id }</title>
		<meta http-equiv="Content-Type" content="text/html; charset=UTF-8" />
		<meta http-equiv="X-UA-Compatible" content="IE=EmulateIE7" />
		<link rel="stylesheet" type="text/css" href="ipiinclude/ipicss/master.css" />
	</head>
	<body>
	<div class="m15">
		<table cellpadding="0" cellspacing="0" class="tablelist ">
			<tr>
				<th>订单号</th>
				<td>${order.id }</td>
			</tr>
			<tr>
				<th>地址</th>
				<td>${order.addr }</td>
			</tr>
			<tr>
				<th>联系人</th>
				<td>${order.name }</td>
			</tr>
			<tr>
				<th>联系电话</th>
				<td>${order.msisdn }</td>
			</tr>
		</table>
		<h3>订单明细</h3>
				<table cellpadding="0" cellspacing="0" class="tablelist mt15">
					<tr>
					<th>序号</th>
					<th>餐名</th>
					<th>数量</th>
					<th>单价</th>
					</tr>
					<c:choose>
		       		<c:when test="${not empty order.items}">
		       		
		       			<c:forEach items="${order.items}" var="item" varStatus="v">
		        			<tr <c:if test="${v.count % 2 == 0}">class="trbg"</c:if>>
					            <td class="center"><a  target="_blank" href="javascript:void(0)">${v.count }</a></td>
					            <td>${item.productName }</td>
					            <td>${item.productNum }</td>
					            <td>￥<fmt:formatNumber value="${item.price / 100.0}" pattern="#0.00" />元</td>
				          	</tr>
		       			</c:forEach>
		       		</c:when>
		       		<c:otherwise>
		       			<tr><td colspan="6"><div class="didnot">暂无数据！<a href="userIndex_list.action">挑选&gt;&gt;</a></div></td></tr>
		       		</c:otherwise>
		        </c:choose>
		        </table>
		
	</div>
	</body>
</html>